<?php
	require_once (dirname(__FILE__)."/../../config.php");
	 if(isset($_GET['mac'])){
	  	$sql1="select * from zy_equipment where MacAddress='".$_GET['mac']."'";
	  	$rss = mysql_query($sql1);
	  	$rows = mysql_fetch_array($rss);
	  }
  	 $unm = updateStatus($rows['updater']);
  	 outPutXml($unm);
 	 function updateStatus($user_id){
  		$sql="UPDATE zy_updatestatus set routeupdate=0 where user_id ='".$user_id."'";
  		$rs = mysql_query($sql);
  		//成功
  		if($rs > 0){
		   $message.="<result>1</result>\n";
		 return $message;
  		}else{
  			//失败
		   $message.="<result>0</result>\n";
		 return $message;
  		}
  		
  } 
  
    function outPutXml($content) {
	header("Content-type:text/xml");
	echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n";
	echo "<netcuberesult>\n";
	echo $content;
	echo "</netcuberesult>";
	die();
}
?>
